export GEM5=/gem5
export SPEC_CPU=/benchspec/CPU
export SPEC_CONF=/spec_confs

#Integer： perlbench gcc mcf omnetpp xalancbmk x264 deepsjeng leela exchange2 xz
#Floating Point: bwaves cactusBSSN lbm wrf cam4 pop2 imagick nab fotonik3d roms

for bench in mcf
do
BIN=$(grep $bench $SPEC_CONF/binaries_2017.txt | awk -F':' '{print $2}' | xargs)
BINA=./$(echo $BIN)"_base.mytest-64"

ARGS=$(grep $bench $SPEC_CONF/args_2017.txt | awk -F':' '{print $2}'| xargs)
IN=$(grep $bench $SPEC_CONF/input_2017.txt | awk -F':' '{print $2}'| xargs)

cd $SPEC_CPU/*$(echo $bench)_s/run/run_base_refspeed_mytest-64.0000
$GEM5/build/ARM/gem5.opt $GEM5/configs/example/se.py  -c "$BINA" -o "$ARGS" -i "$IN" --caches --l2cache --cpu-type=DerivO3CPU   --maxinsts=1000000000 --fast-forward=10000000000  --mem-size=16384MB
# mv m5out/stats.txt m5out/statsno.txt
done